namespace XRM.Security.DataAccess.Context
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class UserInfoSystemChangeKey : DbMigration
    {
        public override void Up()
        {
            Sql("delete from UserInfoSystem");
            DropPrimaryKey("dbo.UserInfoSystem");
            AddColumn("dbo.UserInfoSystem", "UserInfoSystemId", c => c.Int(nullable: false, identity: true));
            AddPrimaryKey("dbo.UserInfoSystem", "UserInfoSystemId");
        }
        
        public override void Down()
        {
            DropPrimaryKey("dbo.UserInfoSystem");
            DropColumn("dbo.UserInfoSystem", "UserInfoSystemId");
            AddPrimaryKey("dbo.UserInfoSystem", new[] { "UserRegisterId", "InfoSystemId" });
        }
    }
}
